/*!
 * Querystring module v1.0.0 of jRaiser javascript library
 * http://code.google.com/p/jraiser/
 *
 * Author: Heero.Luo
 * Licensed under MIT license
 *
 * Date: Tue Feb 14 2012 11:05:28 GMT+0800
 */
define(["core/1.0.x/core"],function(e,t,n){"use strict";function i(e,t){t=r.mix({encode:encodeURIComponent},t);var n=[];return r.each(e,function(e,r){n.push(t.encode(r)+"="+t.encode(e))}),n.join("&")}var r=e("core/1.0.x/core");r.extend(t,{stringify:i,parse:function(e,t){t=r.mix({decode:decodeURIComponent},t);var n={},i=0;e=(e||window.location.search.substr(1)).split(/[&=]/);while(i<e.length)n[t.decode(e[i++])]=t.decode(e[i++]);return n},append:function(e,t){if(!t)return e;typeof t!="string"&&(t=i(t)),t=t.replace(/^[?&]+/,"");var n=e.indexOf("#"),r="";return n!==-1&&(r=e.substring(n,e.length),e=e.substring(0,n)),e=e.replace(/[?&]+$/,""),e+(e.indexOf("?")===-1?"?":"&")+t+r}})})